<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSysUserTable extends Migration
{
    /**
     * Run the migrations.
     * 运行数据库迁移
     * @return void
     */
    public function up()
    {
        //新建表
        /*Schema::create('sys_user', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('nickname', 60);
            $table->char('password', 60);
            $table->char('openid', 50)->nullable();
            $table->string('head_img_url', 255);
        });*/

        //新增字段，保证字段不存在
        /*Schema::table('sys_user', function (Blueprint $table) {
            $table->string('sex', 10)->after('head_img_url');
        });*/

    }

    /**
     * Reverse the migrations.
     * 回滚数据库迁移
     * @return void
     */
    public function down()
    {
        //Schema::dropIfExists('sys_user');
    }
}
